<template>
  <el-card class="box-card" >
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="已审核" name="first">  <el-row>
        <el-col :span="6">
          物业名：
          <el-input style="width: 150px"
                    placeholder="请输入内容"
                    prefix-icon="el-icon-search"
                    v-model="input">
          </el-input>
        </el-col>
        <el-col :span="6">
          车库名：
          <el-input style="width: 150px"
                    placeholder="请输入内容"
                    prefix-icon="el-icon-search"
                    v-model="input">
          </el-input>
        </el-col>
        <el-col :span="6">
          <el-button>查询</el-button>
        </el-col>
      </el-row>
        <el-table
            :data="tableData"
            border
            style="width: 100%">
          <el-table-column
              fixed
              prop="date"
              label="序号"
              width="100">
          </el-table-column>
          <el-table-column
              prop="name"
              label="物业名"
              width="120">
          </el-table-column>
          <el-table-column
              prop="avatar"
              label="物业相关车库照片"
              width="170">
            <template slot-scope="scope">
              <el-popover placement="top-start" title="" trigger="hover">
                <img :src="scope.row.product" alt="" style="width: 150px;height: 150px">
                <img slot="reference" :src="scope.row.product" style="width: 30px;height: 30px">
              </el-popover>
            </template>
          </el-table-column>
          <el-table-column
              prop="province"
              label="联系电话"
              width="120">
          </el-table-column>
          <el-table-column
              prop="province"
              label="相关车库名"
              width="120">
          </el-table-column>
          <el-table-column
              prop="avatar"
              label="物业相关资质证明照片"
              width="170">
            <template slot-scope="scope">
              <el-popover placement="top-start" title="" trigger="hover">
                <img :src="scope.row.product" alt="" style="width: 150px;height: 150px">
                <img slot="reference" :src="scope.row.product" style="width: 30px;height: 30px">
              </el-popover>
            </template>
          </el-table-column>
          <el-table-column
              prop="zip"
              label="审核状态"
              width="120">
          </el-table-column>
          <el-table-column
              prop="zip"
              label="是否黑名单"
              width="120">
          </el-table-column>
          <el-table-column
              fixed="right"
              label="操作"
          >
            <template >
              <el-button type="text" @click="open1">拉入黑名单</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="未审核" name="second">
        <el-row>
          <el-col :span="6">
            物业名：
            <el-input style="width: 150px"
                      placeholder="请输入内容"
                      prefix-icon="el-icon-search"
                      v-model="input">
            </el-input>
          </el-col>
          <el-col :span="6">
            车库名：
            <el-input style="width: 150px"
                      placeholder="请输入内容"
                      prefix-icon="el-icon-search"
                      v-model="input">
            </el-input>
          </el-col>
          <el-col :span="6">
            <el-button>查询</el-button>
          </el-col>
        </el-row>
        <el-table
            :data="tableData"
            border
            style="width: 100%">
          <el-table-column
              fixed
              prop="date"
              label="序号"
              width="100">
          </el-table-column>
          <el-table-column
              prop="name"
              label="物业名"
              width="120">
          </el-table-column>
          <el-table-column
              prop="avatar"
              label="物业相关车库照片"
              width="170">
            <template slot-scope="scope">
              <el-popover placement="top-start" title="" trigger="hover">
                <img :src="scope.row.product" alt="" style="width: 150px;height: 150px">
                <img slot="reference" :src="scope.row.product" style="width: 30px;height: 30px">
              </el-popover>
            </template>
          </el-table-column>
          <el-table-column
              prop="province"
              label="联系电话"
              width="120">
          </el-table-column>
          <el-table-column
              prop="province"
              label="相关车库名"
              width="120">
          </el-table-column>
          <el-table-column
              prop="avatar"
              label="物业相关资质证明照片"
              width="170">
            <template slot-scope="scope">
              <el-popover placement="top-start" title="" trigger="hover">
                <img :src="scope.row.product" alt="" style="width: 150px;height: 150px">
                <img slot="reference" :src="scope.row.product" style="width: 30px;height: 30px">
              </el-popover>
            </template>
          </el-table-column>
          <el-table-column
              prop="zip"
              label="审核状态"
              width="120">
          </el-table-column>
          <el-table-column
              prop="zip"
              label="是否黑名单"
              width="120">
          </el-table-column>
          <el-table-column
              fixed="right"
              label="操作"
          >
            <template >
              <el-button type="text" @click="open">审核信息</el-button>
            </template>
          </el-table-column>
        </el-table>
      </el-tab-pane>
    </el-tabs>

    <div class="block">
      <el-pagination
          layout="prev, pager, next"
          :total="1000">
      </el-pagination>
    </div>
  </el-card>

</template>

<script>
export default {
  name: "parkingReview",
  data() {
    return {
      input: '',
      tableData: [{
        avatar: '',
        product:("https://alikesiren.oss-cn-chengdu.aliyuncs.com/uugai.com-v5872-16208709299370.png"),
        date: '2016-05-02',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1518 弄',
        zip: 200333
      }, {
        avatar: '',
        product:("https://alikesiren.oss-cn-chengdu.aliyuncs.com/uugai.com-v5872-16208709299370.png"),
        date: '2016-05-04',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1517 弄',
        zip: 200333
      }, {
        avatar: '',
        product:("https://alikesiren.oss-cn-chengdu.aliyuncs.com/uugai.com-v5872-16208709299370.png"),
        date: '2016-05-01',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1519 弄',
        zip: 200333
      }, {
        avatar: '',
        product:("https://alikesiren.oss-cn-chengdu.aliyuncs.com/uugai.com-v5872-16208709299370.png"),
        date: '2016-05-03',
        name: '王小虎',
        province: '上海',
        city: '普陀区',
        address: '上海市普陀区金沙江路 1516 弄',
        zip: 200333
      }],
      activeName: 'first'
    }
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
    open() {
      this.$confirm('此操作将审核用户信息, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$message({
          type: 'success',
          message: '审核成功!'
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '审核失败'
        });
      });
    },
    open1() {
      this.$confirm('此操作将用户拉入黑名单, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$message({
          type: 'success',
          message: '拉入黑名单成功!'
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '拉入黑名单失败'
        });
      });
    }
  }
}
</script>

<style>
.el-row {
  margin-bottom: 20px
}
.el-col {
  border-radius: 4px;
}
.bg-purple-dark {
  background: #99a9bf;
}
.bg-purple {
  background: #d3dce6;
}
.bg-purple-light {
  background: #e5e9f2;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
.row-bg {
  padding: 10px 0;
  background-color: #f9fafc;
}
</style>